Skip to content

feat(config): reject invalid network CIDRs at environment load (PIPE-1002) - #281

Open
Dylan-M wants to merge 1 commit into
dylanmyers/pipe-1036-identity-projectionfrom
dylanmyers/pipe-1002-config-cidr-validation
Open

feat(config): reject invalid network CIDRs at environment load (PIPE-1002)#281
Dylan-M wants to merge 1 commit into
dylanmyers/pipe-1036-identity-projectionfrom
dylanmyers/pipe-1002-config-cidr-validation

Conversation

@Dylan-M

@Dylan-M Dylan-M commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Stacked on #280

Proposed Change

Gates environment load on the network CIDR contract. EnvironmentConfig.Build
validates every resolved network's CIDR (datagen.ValidateCIDR rejects unparseable,
non-IPv4, and prefixes longer than /29) and fails the load naming the offending
CIDR, rather than silently defaulting.

Generated networks are always valid today, so this is the enforcement point for when
user-supplied CIDRs arrive through config.

Validation: no user-facing CIDR input exists yet, so the gate can't be exercised
from a config file; it's covered by unit tests. validateNetworks accepts valid
IPv4 networks and rejects /30-/32, non-IPv4, and malformed CIDRs, and Build
fails on an injected invalid network and propagates a generation error.

Checklist
  • Changes are tested
  • CI has passed

@Dylan-M Dylan-M changed the title feat(config): validate network CIDRs at environment load (PIPE-1002) feat(config): reject invalid network CIDRs at environment load (PIPE-1002) Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant